/**
 * Copyright(c) 2013 Jade Techonologies Co., Ltd.
 *
 * History:
 *   13-7-11 上午9:46 Created by sky
 */
package com.jade.modules.message.sms;

/**
 * 短信相关的常量定义。
 *
 * @author sky
 * @version 1.0 13-7-11 上午9:46
 */
public interface SmsConstants
{
    /** 状态报告定义 */
    public static final byte REPORT_NO = 0;
    public static final byte REPORT_ALL = 1;
    public static final byte REPORT_FAILED = 2;

    /** 连接模式 */
    public static final byte MODE_WRITE = 0;
    public static final byte MODE_READ = 1;
    public static final byte MODE_READ_WRITE = 2;

    /** 引起MT下发的原因。 */
    public static final byte MT_REASON_MO_FIRST = 0;
    public static final byte MT_REASON_MO_NOT_FIRST = 1;
    public static final byte MT_REASON_NOT_MO = 2;
    public static final byte MT_REASON_SYSTEM = 3;

    /**
     * 计费用户类型。
     * 0 接收者计费。
     * 1 发送者计费
     * 2 SP付费
     * 3 第三方付费。
     */
    public static final byte FEE_DESTINATION = 0;
    public static final byte FEE_SOURCE = 1;
    public static final byte FEE_SP = 2;
    public static final byte FEE_OTHER = 3;

    /**
     * 00	“短消息类型”为“发送”，对“计费用户号码”不计信息费，此类话单仅用于核减SP对称的信道费
     * 01	对“计费用户号码”免费
     * 02	对“计费用户号码”按条计信息费
     * 03	对“计费用户号码”按包月收取信息费
     * 04	对“计费用户号码”的信息费封顶
     * 05	对“计费用户号码”的收费是由SP实现
     */
    public static final String FEE_TYPE_NO_FEE = "00";
    public static final String FEE_TYPE_FREE = "01";
    public static final String FEE_TYPE_PIECE = "02";
    public static final String FEE_TYPE_PACKAGE = "03";
    public static final String FEE_TYPE_FENGDING = "04";
    public static final String FEE_TYPE_SP = "05";

    public static final int MAX_MESSAGE_LENGTH = 140;
    public static final int MAX_UNICODE_LENGTH = 70;
    public static final int MAX_ASCII_LENGTH = 160;

    /**
     * Msg_Fmt	1	Integer	信息格式  0：ASCII串  3：短信写卡操作
     * 4：二进制信息  8：UCS2编码15：含GB汉字  。。。。。。
     */
    public static final byte FORMAT_ASCII = 0;
    public static final byte FORMAT_WRITE_CARD = 3;
    public static final byte FORMAT_BINARY = 4;
    public static final byte FORMAT_UCS2 = 8;
    public static final byte FORMAT_GBK = 15;
    public static final byte DEFAULT_FORMAT = FORMAT_UCS2;

    //Message is delivered to destination
    public static final String DELIVERED = "DELIVRD";

    //Message validity period has expired.
    public static final String EXPIRED = "EXPIRED";

    //Message has been deleted
    public static final String DELETED = "DELETED";

    //Message is undeliverable
    public static final String UNDELIVERABLE = "UNDELIV";

    //Message has delayed
    public static final String DELAYED = "DELAYED";

    //Message is in accepted state
    //(i.e. has been manually read on behalf of the subscriber by customer service)
    public static final String ACCEPTED = "ACCEPTED";

    //Message is in invalid state
    public static final String UNKNOWN = "UNKNOWN";

    //Message is in a rejected state
    public static final String REJECTED = "REJECTED";
}
